package framework.sepal4java.common.struct.ConstantEnum;

public enum ResourceType {
    SENSOR,
    ACTOR,
    HYBRID;

    public static ResourceType fromString(String type) {
        for (ResourceType resourceType : ResourceType.values()) {
            if (resourceType.name().equalsIgnoreCase(type)) {
                return resourceType;
            }
        }
        throw new IllegalArgumentException("No constant with text " + type + " found");
    }
}
